/*
* Author:  Greg Nowak and Vaibhav Sharma
* Michigan State University
* 
* This is the implementation of the NFC Wireless Sensor Network Application
*/
#include "StorageVolumes.h"
#include "Timer.h"
#include "NFCWireless.h"
// Configuration Information
configuration NFCWirelessAppC
{

}

// Implementation
implementation
{
  	components MainC, NFCWirelessC, LedsC;
  	components new LogStorageC(VOLUME_LOG, TRUE);
  	components HilTimerMilliC;
  	components new TimerMilliC() as ReceiveTimer;
  	    
  	NFCWirelessC -> MainC.Boot;
  	NFCWirelessC.Leds -> LedsC; 
	NFCWirelessC.LogRead -> LogStorageC;
	NFCWirelessC.LogWrite -> LogStorageC;
	

    components ActiveMessageC;
    components new AMSenderC(AM_NFCWIRELESS);

    NFCWirelessC.Packet -> AMSenderC;
    NFCWirelessC.AMPacket -> AMSenderC;
    NFCWirelessC.AMSend -> AMSenderC;
    NFCWirelessC.AMControl -> ActiveMessageC;
    NFCWirelessC.ReceiveTimer -> ReceiveTimer;

    components new AMReceiverC(AM_NFCWIRELESS);
    NFCWirelessC.Receive -> AMReceiverC;
}
